import request from '@/utils/request'
import { updateRole } from './role'

export default{
  //根据页码和显示条数进行条件查询
    pageList(current,limit,query) {
        return request({
          url: `/eduService/edu/pageCondition/${current}/${limit}`, 
          method: 'post',
          data: query
        })
      },
      //根据id删除用户
      removeById(id) {
        return request({
            url: `/eduService/edu/${id}`,
            method: 'delete'
        })
      },
      //往数据库添加用户
      add(teacher) {
        return request({
            url: `/eduService/edu/add`,
            method: 'post',
            data:teacher
        })
      },
      //根据id查询用户
      getById(id) {
        return request({
            url: `/eduService/edu/get/${id}`,
            method: 'get',
        })
      },
      //更新用户信息
      update(teacher){
        return request({
            url: '/eduService/edu/update',
            method: 'post',
            data: teacher
        })
    }
}